FROM centos:latest
MAINTAINER javamall.com.cn

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
ADD jdk-8u201-linux-x64.tar.gz /usr/java/

RUN mv /usr/java/jdk1.8.0_201 /usr/java/jdk

RUN yum install kde-l10n-Chinese -y
RUN yum install glibc-common -y
RUN localedef -c -f UTF-8 -i zh_CN zh_CN.utf8
ENV LC_ALL zh_CN.UTF-8

ENV JAVA_HOME=/usr/java/jdk
ENV JRE_HOME=/usr/java/jdk/jre
ENV CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
ENV PATH=$JAVA_HOME/bin:$PATH